<!--
 * @Description  : 
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2022-04-06 10:57:56
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-04-19 16:11:10
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\financetable\\financetable.component.html
 * Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 页头 -->
<page-header-wrapper [title]="'财务报表'"></page-header-wrapper>
<nz-card nzTitle="财务报表" [nzExtra]="extraTemplate" acl [acl-ability]="['financetable-table']">
  <ng-template #extraTemplate>
    <div class="chooseBox">
      <!-- <button nz-button nzType="primary" (click)="exportFun()">导出</button> -->
      <div class="timeBox">
        <nz-radio-group [(ngModel)]="mode" nzButtonStyle="solid" (ngModelChange)="changeData()">
          <label nz-radio-button nzValue="year">年</label>
          <label nz-radio-button nzValue="month">月</label>
          <label nz-radio-button nzValue="date">日</label>
          <label nz-radio-button nzValue="define">自定义</label>
        </nz-radio-group>
        <div class="dateBox">
          <nz-date-picker [(ngModel)]="date" [nzMode]="mode" [nzFormat]="dateFormat" *ngIf="mode !== 'define'"
            [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-date-picker>
          <nz-range-picker [(ngModel)]="defineDate" [nzFormat]="dateFormat" *ngIf="mode === 'define'"
            [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-range-picker>
        </div>

      </div>
    </div>

  </ng-template>
  <st #st multiSort [columns]="columns" [ps]="20" [data]="service.$api_listFinancialReportPage"
    [req]="{  params: reqParams }" [scroll]="{ x: '1200px' }" [page]="{  }" [loading]="service.http.loading">
    <ng-template st-row="czcgje" let-item let-index="index">
      {{item.czcgje | currency}}
    </ng-template>
    <ng-template st-row="yingsje" let-item let-index="index">
      {{item.yingsje | currency}}
    </ng-template>
    <ng-template st-row="yisje" let-item let-index="index">
      {{item.yisje | currency}}
    </ng-template>
    <ng-template st-row="yingfyf" let-item let-index="index">
      {{item.yingfyf | currency}}
    </ng-template>
    <ng-template st-row="yifyf" let-item let-index="index">
      {{item.yifyf | currency}}
    </ng-template>
    <ng-template st-row="ykpje" let-item let-index="index">
      {{item.ykpje | currency}}
    </ng-template>
    <ng-template st-row="dkpje" let-item let-index="index">
      {{item.dkpje | currency}}
    </ng-template>
    <ng-template st-row="yingsfjf" let-item let-index="index">
      {{item.yingsfjf | currency}}
    </ng-template>
    <ng-template st-row="yisfjf" let-item let-index="index">
      {{item.yisfjf | currency}}
    </ng-template>
    <ng-template st-row="fjfl" let-item let-index="index">
      {{item.fjfl + '%'}}
    </ng-template>
  </st>
</nz-card>
<nz-card nzTitle="运营报表" [nzExtra]="extraTemplate01" acl [acl-ability]="['financetable-report']">
  <ng-template #extraTemplate01>
    <div class="chooseBox">
      <nz-select [(ngModel)]="enterpriseInfoId" style="width: 200px" (ngModelChange)="initPillarData()">
        <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of interManlist"></nz-option>
      </nz-select>
      <div class="timeBox">
        <nz-radio-group [(ngModel)]="modeNext" nzButtonStyle="solid" (ngModelChange)="changeDataNext()">
          <label nz-radio-button nzValue="year">年</label>
          <label nz-radio-button nzValue="month">月</label>
        </nz-radio-group>
        <div class="dateBox">
          <nz-date-picker [nzDisabledDate]="disabledDate" [(ngModel)]="dateNext" [nzMode]="modeNext"
            (ngModelChange)="onChangeNext($event)"></nz-date-picker>
        </div>
      </div>
    </div>
  </ng-template>
  <div nz-row [nzGutter]="64">
    <div nz-col class="gutter-row" [nzSpan]="12">
      <app-financetable-curve #curve [chartData]="chartData.lineChart"></app-financetable-curve>
    </div>
    <div nz-col class="gutter-row" [nzSpan]="12">
      <app-financetable-pillar #pillar [chartData]="chartData.histogram"></app-financetable-pillar>
    </div>
  </div>
</nz-card>